package com.laicunba.service;

import java.util.List;
import java.util.Map;

import com.laicunba.pojo.RegistryDO;

public interface RegistryService extends BaseService {

	Map<String, String> likeKey(String startsWith);

	boolean create(String id, String val);

	boolean update(String id, String val);

	Map<String, String> find(String[] key);

	List<RegistryDO> list();

	/**
	 * 从缓存中取数据
	 * <ul>
	 * <li>从本地缓存取 <span style='color:red'>60 s</span></li>
	 * <li>从Redis中取<span style='color:red'>long time</span></li>
	 * <li>从DB中取</li>
	 * </ul>
	 * 
	 * @param id
	 * @return
	 */
	String getFromCache(String id);

	void clearCache(String id);

	List<RegistryDO> like(String idPrex, String likeVal);

}
